import App from './App'

// #ifndef VUE3
import Vue from 'vue'
// main.js
import uView from '@/uni_modules/uview-ui'
Vue.use(uView);
// 如此配置即可
uni.$u.config.unit = 'rpx';
Vue.config.productionTip = false
App.mpType = 'app'

const msg = (title, duration = 1500, mask = false, icon = 'none') => {
	if (Boolean(title) === false) {
		return;
	}
	uni.showToast({
		title,
		duration,
		mask,
		icon
	});
}
// import pageHead from 'components/uni-page-head/uni-page-head.vue';
// Vue.component('pageHead',pageHead)

const app = new Vue({
	...App
})

import api from '@/api/common/config.js'
import {
	baseUrl
} from '@/api/common/api.js'
Vue.prototype.$api = api
Vue.prototype.$baseUrl = baseUrl
Vue.prototype.$msg = msg
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif

//公共函数引入
import picture from './utils/picture.js'
Vue.prototype.picture = picture
